<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">

<title>NEWS-2.5.0 - RDoc Documentation</title>


<script src="../js/navigation.js" defer></script>
<script src="../js/search.js" defer></script>
<script src="../js/search_index.js" defer></script>
<script src="../js/searcher.js" defer></script>
<script src="../js/darkfish.js" defer></script>

<script src="../js/jquery-3.2.0.min.js"></script>

<script src="../js/vue.min.js"></script>
<script src="../js/js.cookie.min.js"></script>

<link href="../css/fonts.css" rel="stylesheet">
<link id='rdoccss' href="../css/rdoc.css" rel="stylesheet">
<link href="../css/carbon17.css" rel="stylesheet">

<script type="text/javascript">
  var rdoc_rel_prefix = "../";
  var index_rel_prefix = "../";
  var darkModeCsseHref = "../css/rdoc-dm.css"
  var defaultModeCssHref = "../css/rdoc.css"
  // var cssDarkmode = Cookies.get('darkmode');
  
  if( Cookies.get("darkmode") == "true") {
	$('#rdoccss').attr("href", darkModeCsseHref);
}

//  https://cssdeck.com/blog/simple-jquery-stylesheet-switcher/

document.write('<style type="text/css">body{display:none}</style>');

</script>


</head>
<body id="top" role="document" class="file">
  <!-- this is page.html -->
  <div id='actionbar' >
    <div class='wrapper mdiv'>
      <ul class='grids g0'></ul>
    </div> 
    <!-- VERSION HEADER for 3.3.0-preview2 NOT FOUND -->
  </div> <!-- end action bar -->


 <div class='wrapper hdiv'>

 


<nav id='vapp' role="navigation">
  <div id="project-navigation">
    <div id="home-section" role="region" title="Quick navigation" class="nav-section">
  <h2><a href="../index.html" rel="home">Home</a></h2>

  <div id="table-of-contents-navigation"  >
    <a href="../table_of_contents.html#pages">Pages</a>
    <a href="../table_of_contents.html#classes">Classes</a>
    <a href="../table_of_contents.html#methods">Methods</a>
  </div>
</div>

    <div id="search-section" role="search" class="project-section initially-hidden">
  <form action="#" method="get" accept-charset="utf-8">
    <div id="search-field-wrapper">
      <input id="search-field" role="combobox" aria-label="Search"
             aria-autocomplete="list" aria-controls="search-results"
             type="text" name="search" placeholder="Search" spellcheck="false"
             title="Type to search, Up and Down to navigate, Enter to load">
    </div>

    <ul id="search-results" aria-label="Search Results"
        aria-busy="false" aria-expanded="false"
        aria-atomic="false" class="initially-hidden"></ul>
  </form>
</div>

  </div>

  
<div class="nav-section">
  <h3>Table of Contents</h3>

  <ul class="link-list" role="directory">
    <li><a href="#label-NEWS+for+Ruby+2.5.0">NEWS for Ruby 2.5.0</a>
    <li><a href="#label-Changes+since+the+2.4.0+release">Changes since the 2.4.0 release</a>
    <li><a href="#label-Language+changes">Language changes</a>
    <li><a href="#label-Core+classes+updates+-28outstanding+ones+only-29">Core classes updates (outstanding ones only)</a>
    <li><a href="#label-Stdlib+updates+-28outstanding+ones+only-29">Stdlib updates (outstanding ones only)</a>
    <li><a href="#label-Compatibility+issues+-28excluding+feature+bug+fixes-29">Compatibility issues (excluding feature bug fixes)</a>
    <li><a href="#label-Stdlib+compatibility+issues+-28excluding+feature+bug+fixes-29">Stdlib compatibility issues (excluding feature bug fixes)</a>
    <li><a href="#label-Supported+platform+changes">Supported platform changes</a>
    <li><a href="#label-Implementation+improvements">Implementation improvements</a>
    <li><a href="#label-Miscellaneous+changes">Miscellaneous changes</a>
  </ul>
</div>

  <button id='toggleThing' @click="toggleNav()" >Show/hide navigation</button>

  <div id="project-metadata">
   <div :class="isOpen ? 'block' : 'hidden' " id='toggleMe'>
    
<div id="fileindex-section" class="nav-section">
  <h3>Pages</h3>

  <ul class="link-list">
    <li><a href="../NEWS/NEWS-1_8_7.html">NEWS-1.8.7</a>
    <li><a href="../NEWS/NEWS-1_9_1.html">NEWS-1.9.1</a>
    <li><a href="../NEWS/NEWS-1_9_2.html">NEWS-1.9.2</a>
    <li><a href="../NEWS/NEWS-1_9_3.html">NEWS-1.9.3</a>
    <li><a href="../NEWS/NEWS-2_0_0.html">NEWS-2.0.0</a>
    <li><a href="../NEWS/NEWS-2_1_0.html">NEWS-2.1.0</a>
    <li><a href="../NEWS/NEWS-2_2_0.html">NEWS-2.2.0</a>
    <li><a href="../NEWS/NEWS-2_3_0.html">NEWS-2.3.0</a>
    <li><a href="../NEWS/NEWS-2_4_0.html">NEWS-2.4.0</a>
    <li><a href="../NEWS/NEWS-2_5_0.html">NEWS-2.5.0</a>
    <li><a href="../NEWS/NEWS-2_6_0.html">NEWS-2.6.0</a>
    <li><a href="../NEWS/NEWS-2_7_0.html">NEWS-2.7.0</a>
    <li><a href="../NEWS/NEWS-3_0_0_md.html">NEWS-3.0.0</a>
    <li><a href="../NEWS/NEWS-3_1_0_md.html">NEWS-3.1.0</a>
    <li><a href="../NEWS/NEWS-3_2_0_md.html">NEWS-3.2.0</a>
    <li><a href="../bsearch_rdoc.html">bsearch</a>
    <li><a href="../bug_triaging_rdoc.html">bug_triaging</a>
    <li><a href="../case_mapping_rdoc.html">case_mapping</a>
    <li><a href="../character_selectors_rdoc.html">character_selectors</a>
    <li><a href="../command_injection_rdoc.html">command_injection</a>
    <li><a href="../contributing_md.html">contributing</a>
    <li><a href="../contributing/building_ruby_md.html">building_ruby</a>
    <li><a href="../contributing/documentation_guide_md.html">documentation_guide</a>
    <li><a href="../contributing/glossary_md.html">glossary</a>
    <li><a href="../contributing/making_changes_to_ruby_md.html">making_changes_to_ruby</a>
    <li><a href="../contributing/making_changes_to_stdlibs_md.html">making_changes_to_stdlibs</a>
    <li><a href="../contributing/reporting_issues_md.html">reporting_issues</a>
    <li><a href="../contributing/testing_ruby_md.html">testing_ruby</a>
    <li><a href="../dig_methods_rdoc.html">dig_methods</a>
    <li><a href="../distribution_md.html">distribution</a>
    <li><a href="../dtrace_probes_rdoc.html">dtrace_probes</a>
    <li><a href="../encodings_rdoc.html">encodings</a>
    <li><a href="../extension_ja_rdoc.html">extension.ja</a>
    <li><a href="../extension_rdoc.html">extension</a>
    <li><a href="../fiber_md.html">fiber</a>
    <li><a href="../format_specifications_rdoc.html">format_specifications</a>
    <li><a href="../globals_rdoc.html">globals</a>
    <li><a href="../implicit_conversion_rdoc.html">implicit_conversion</a>
    <li><a href="../keywords_rdoc.html">keywords</a>
    <li><a href="../maintainers_md.html">maintainers</a>
    <li><a href="../marshal_rdoc.html">marshal</a>
    <li><a href="../memory_view_md.html">memory_view</a>
    <li><a href="../optparse/argument_converters_rdoc.html">argument_converters</a>
    <li><a href="../optparse/creates_option_rdoc.html">creates_option</a>
    <li><a href="../optparse/option_params_rdoc.html">option_params</a>
    <li><a href="../optparse/tutorial_rdoc.html">tutorial</a>
    <li><a href="../packed_data_rdoc.html">packed_data</a>
    <li><a href="../ractor_md.html">ractor</a>
    <li><a href="../regexp_rdoc.html">regexp</a>
    <li><a href="../regexp/methods_rdoc.html">methods</a>
    <li><a href="../regexp/unicode_properties_rdoc.html">unicode_properties</a>
    <li><a href="../ruby_3_3_0_preview2/COPYING.html">COPYING</a>
    <li><a href="../ruby_3_3_0_preview2/COPYING_ja.html">COPYING.ja</a>
    <li><a href="../ruby_3_3_0_preview2/LEGAL.html">LEGAL</a>
    <li><a href="../ruby_3_3_0_preview2/NEWS_md.html">NEWS</a>
    <li><a href="../ruby_3_3_0_preview2/README_ja_md.html">README.ja</a>
    <li><a href="../ruby_3_3_0_preview2/README_md.html">README</a>
    <li><a href="../security_rdoc.html">security</a>
    <li><a href="../signals_rdoc.html">signals</a>
    <li><a href="../standard_library_rdoc.html">standard_library</a>
    <li><a href="../strftime_formatting_rdoc.html">strftime_formatting</a>
    <li><a href="../syntax_rdoc.html">syntax</a>
    <li><a href="../syntax/assignment_rdoc.html">assignment</a>
    <li><a href="../syntax/calling_methods_rdoc.html">calling_methods</a>
    <li><a href="../syntax/comments_rdoc.html">comments</a>
    <li><a href="../syntax/control_expressions_rdoc.html">control_expressions</a>
    <li><a href="../syntax/exceptions_rdoc.html">exceptions</a>
    <li><a href="../syntax/literals_rdoc.html">literals</a>
    <li><a href="../syntax/methods_rdoc.html">methods</a>
    <li><a href="../syntax/miscellaneous_rdoc.html">miscellaneous</a>
    <li><a href="../syntax/modules_and_classes_rdoc.html">modules_and_classes</a>
    <li><a href="../syntax/pattern_matching_rdoc.html">pattern_matching</a>
    <li><a href="../syntax/precedence_rdoc.html">precedence</a>
    <li><a href="../syntax/refinements_rdoc.html">refinements</a>
    <li><a href="../timezones_rdoc.html">timezones</a>
    <li><a href="../windows_md.html">windows</a>
    <li><a href="../yjit/yjit_md.html">yjit</a>
    <li><a href="../yjit/yjit_hacking_md.html">yjit_hacking</a>
  </ul>
</div>

   </div>
  </div>
</nav>


<!--  carbon ads here -->

<div id='extraz'>
  <div class='adzbox-index'  >
   
  </div>
 </div>         


<main role="main" aria-label="Page NEWS/NEWS-2.5.0">

<h1 id="label-NEWS+for+Ruby+2.5.0"><a href="../ruby_3_3_0_preview2/NEWS_md.html">NEWS</a> for Ruby 2.5.0<span><a href="#label-NEWS+for+Ruby+2.5.0">&para;</a> <a href="#top">&uarr;</a></span></h1>

<p>This document is a list of user visible feature changes made between releases except for bug fixes.</p>

<p>Note that each entry is kept so brief that no reason behind or reference information is supplied with.  For a full list of changes with all sufficient information, see the ChangeLog file or Redmine (e.g. <code>https://bugs.ruby-lang.org/issues/$FEATURE_OR_BUG_NUMBER</code>)</p>

<h2 id="label-Changes+since+the+2.4.0+release">Changes since the 2.4.0 release<span><a href="#label-Changes+since+the+2.4.0+release">&para;</a> <a href="#top">&uarr;</a></span></h2>

<h3 id="label-Language+changes">Language changes<span><a href="#label-Language+changes">&para;</a> <a href="#top">&uarr;</a></span></h3>
<ul><li>
<p>Top-level constant look-up is removed.  [Feature #11547]</p>
</li><li>
<p>rescue/else/ensure are allowed inside do/end blocks.  [Feature #12906]</p>
</li><li>
<p>refinements take place in string interpolations.  [Feature #13812]</p>
</li></ul>

<h3 id="label-Core+classes+updates+-28outstanding+ones+only-29">Core classes updates (outstanding ones only)<span><a href="#label-Core+classes+updates+-28outstanding+ones+only-29">&para;</a> <a href="#top">&uarr;</a></span></h3>
<ul><li>
<p><a href="../Array.html"><code>Array</code></a></p>
<ul><li>
<p>New methods:</p>
<ul><li>
<p><a href="../Array.html#method-i-append"><code>Array#append</code></a>  [Feature #12746]</p>
</li><li>
<p><a href="../Array.html#method-i-prepend"><code>Array#prepend</code></a>  [Feature #12746]</p>
</li></ul>
</li></ul>
</li><li>
<p><a href="../Data.html"><code>Data</code></a></p>
<ul><li>
<p>Is deprecated. It was a base class for C extensions, and it’s not necessary to expose in Ruby level. [Feature #3072]</p>
</li></ul>
</li><li>
<p><a href="../Exception.html"><code>Exception</code></a></p>
<ul><li>
<p>New methods:</p>
<ul><li>
<p><a href="../Exception.html#method-i-full_message"><code>Exception#full_message</code></a> to retrieve a <a href="../String.html"><code>String</code></a> expression of an exception, formatted in the same way in which Ruby prints out an uncaught exception.  [Feature #14141] [experimental]</p>
</li></ul>
</li></ul>
</li><li>
<p><a href="../Dir.html"><code>Dir</code></a></p>
<ul><li>
<p><a href="../Dir.html#method-c-glob"><code>Dir.glob</code></a> provides new optional keyword argument, <code>:base</code> .  [Feature #13056]</p>
</li><li>
<p><a href="../Dir.html#method-c-chdir"><code>Dir.chdir</code></a> (without block arg), <a href="../Dir.html#method-c-open"><code>Dir.open</code></a>, <a href="../Dir.html#method-c-new"><code>Dir.new</code></a>, <a href="../Dir.html#method-c-mkdir"><code>Dir.mkdir</code></a>, <a href="../Dir.html#method-c-rmdir"><code>Dir.rmdir</code></a>, <a href="../Dir.html#method-c-empty-3F"><code>Dir.empty?</code></a> releases GVL</p>
</li><li>
<p>New methods:</p>
<ul><li>
<p><a href="../Dir.html#method-c-children"><code>Dir.children</code></a>  [Feature #11302]</p>
</li><li>
<p><a href="../Dir.html#method-c-each_child"><code>Dir.each_child</code></a>  [Feature #11302]</p>
</li></ul>
</li></ul>
</li><li>
<p><a href="../Enumerable.html"><code>Enumerable</code></a></p>
<ul><li>
<p><a href="../Enumerable.html#method-i-any-3F"><code>Enumerable#any?</code></a>, <a href="../Enumerable.html#method-i-all-3F"><code>Enumerable#all?</code></a>, <a href="../Enumerable.html#method-i-none-3F"><code>Enumerable#none?</code></a> and <a href="../Enumerable.html#method-i-one-3F"><code>Enumerable#one?</code></a> accept a pattern argument. [Feature #11286]</p>
</li></ul>
</li><li>
<p><a href="../File.html"><code>File</code></a></p>
<ul><li>
<p><a href="../File.html#method-c-open"><code>File.open</code></a> accepts <code>:newline</code> option to imply text mode. [Bug #13350]</p>
</li><li>
<p><a href="../IO.html#method-i-path"><code>File#path</code></a> raises an <a href="../IOError.html"><code>IOError</code></a> for files opened with File::Constants::TMPFILE option. [Feature #13568]</p>
</li><li>
<p><a href="../File.html#method-c-stat"><code>File.stat</code></a>, <a href="../File.html#method-c-exist-3F"><code>File.exist?</code></a> and other <code>rb_stat()</code>-using methods release GVL. [Bug #13941]</p>
</li><li>
<p><a href="../File.html#method-c-rename"><code>File.rename</code></a> releases GVL. [Feature #13951]</p>
</li><li>
<p><a href="../File/Stat.html#method-i-atime"><code>File::Stat#atime</code></a>, <a href="../File/Stat.html#method-i-mtime"><code>File::Stat#mtime</code></a> and <a href="../File/Stat.html#method-i-ctime"><code>File::Stat#ctime</code></a> support fractional second timestamps on Windows 8 and later.  [Feature #13726]</p>
</li><li>
<p><a href="../File/Stat.html#method-i-ino"><code>File::Stat#ino</code></a> and <a href="../File.html#method-c-identical-3F"><code>File.identical?</code></a> support ReFS 128bit ino on Windows 8.1 and later.  [Feature #13731]</p>
</li><li>
<p><a href="../File.html#method-c-readable-3F"><code>File.readable?</code></a>, <a href="../File.html#method-c-readable_real-3F"><code>File.readable_real?</code></a>, <a href="../File.html#method-c-writable-3F"><code>File.writable?</code></a>, <a href="../File.html#method-c-writable_real-3F"><code>File.writable_real?</code></a>, <a href="../File.html#method-c-executable-3F"><code>File.executable?</code></a>, <a href="../File.html#method-c-executable_real-3F"><code>File.executable_real?</code></a>, <a href="../File.html#method-c-mkfifo"><code>File.mkfifo</code></a>, <a href="../File.html#method-c-readlink"><code>File.readlink</code></a>, <a href="../File.html#method-c-truncate"><code>File.truncate</code></a>, <a href="../File.html#method-i-truncate"><code>File#truncate</code></a>, <a href="../File.html#method-c-chmod"><code>File.chmod</code></a>, <a href="../File.html#method-c-lchmod"><code>File.lchmod</code></a>, <a href="../File.html#method-c-chown"><code>File.chown</code></a>, <a href="../File.html#method-c-lchown"><code>File.lchown</code></a>, <a href="../File.html#method-c-unlink"><code>File.unlink</code></a>, <a href="../File.html#method-c-utime"><code>File.utime</code></a>, <a href="../File.html#method-c-lstat"><code>File.lstat</code></a> release GVL</p>
</li><li>
<p>New method:</p>
<ul><li>
<p><a href="../File.html#method-c-lutime"><code>File.lutime</code></a>  [Feature #4052]</p>
</li></ul>
</li></ul>
</li><li>
<p><a href="../Hash.html"><code>Hash</code></a></p>
<ul><li>
<p>New methods:</p>
<ul><li>
<p><a href="../Hash.html#method-i-transform_keys"><code>Hash#transform_keys</code></a>  [Feature #13583]</p>
</li><li>
<p><a href="../Hash.html#method-i-transform_keys-21"><code>Hash#transform_keys!</code></a>  [Feature #13583]</p>
</li><li>
<p><a href="../Hash.html#method-i-slice"><code>Hash#slice</code></a>  [Feature #8499]</p>
</li></ul>
</li></ul>
</li><li>
<p><a href="../IO.html"><code>IO</code></a></p>
<ul><li>
<p><a href="../IO.html#method-c-copy_stream"><code>IO.copy_stream</code></a> tries copy offload with copy_file_range(2) [Feature #13867]</p>
</li><li>
<p>New methods:</p>
<ul><li>
<p><a href="../IO.html#method-i-pread"><code>IO#pread</code></a>  [Feature #4532]</p>
</li><li>
<p><a href="../IO.html#method-i-pwrite"><code>IO#pwrite</code></a>  [Feature #4532]</p>
</li><li>
<p><a href="../IO.html#method-i-write"><code>IO#write</code></a> accepts multiple arguments  [Feature #9323]</p>
</li></ul>
</li></ul>
</li><li>
<p><a href="../IOError.html"><code>IOError</code></a></p>
<ul><li>
<p><a href="../IO.html#method-i-close"><code>IO#close</code></a> might raise an error with message “stream closed”, but it is refined to “stream closed in another thread”. The new message is more clear for user. [Bug #13405]</p>
</li></ul>
</li><li>
<p><a href="../Integer.html"><code>Integer</code></a></p>
<ul><li>
<p><a href="../Integer.html#method-i-round"><code>Integer#round</code></a>, <a href="../Integer.html#method-i-floor"><code>Integer#floor</code></a>, <a href="../Integer.html#method-i-ceil"><code>Integer#ceil</code></a> and <a href="../Integer.html#method-i-truncate"><code>Integer#truncate</code></a> always return an <a href="../Integer.html"><code>Integer</code></a>. [Bug #13420]</p>
</li><li>
<p><a href="../Integer.html#method-i-pow"><code>Integer#pow</code></a> accepts modulo argument for calculating modular exponentiation.  [Feature #12508] [Feature #11003]</p>
</li><li>
<p>New methods:</p>
<ul><li>
<p><a href="../Integer.html#method-i-allbits-3F"><code>Integer#allbits?</code></a>, <a href="../Integer.html#method-i-anybits-3F"><code>Integer#anybits?</code></a>, <a href="../Integer.html#method-i-nobits-3F"><code>Integer#nobits?</code></a> [Feature #12753]</p>
</li><li>
<p><a href="../Integer.html#method-c-sqrt"><code>Integer.sqrt</code></a>  [Feature #13219]</p>
</li></ul>
</li></ul>
</li><li>
<p><a href="../Kernel.html"><code>Kernel</code></a></p>
<ul><li>
<p><a href="../Kernel.html#method-i-yield_self"><code>Kernel#yield_self</code></a>   [Feature #6721]</p>
</li><li>
<p><a href="../Kernel.html#method-i-pp"><code>Kernel#pp</code></a>  [Feature #14123]</p>
</li><li>
<p><a href="../Kernel.html#method-i-warn"><code>Kernel#warn</code></a>(…, uplevel:n)  [Feature #12882]</p>
</li></ul>
</li><li>
<p><a href="../Method.html"><code>Method</code></a></p>
<ul><li>
<p>New methods:</p>
<ul><li>
<p><a href="../Method.html#method-i-3D-3D-3D"><code>Method#===</code></a> that invokes <a href="../Method.html#method-i-call"><code>Method#call</code></a>, as same as <a href="../Proc.html#method-i-3D-3D-3D"><code>Proc#===</code></a> [Feature #14142]</p>
</li></ul>
</li></ul>
</li><li>
<p><a href="../Module.html"><code>Module</code></a></p>
<ul><li>
<p><a href="../Module.html#method-i-attr"><code>Module#attr</code></a>, <a href="../Module.html#method-i-attr_accessor"><code>Module#attr_accessor</code></a>, <a href="../Module.html#method-i-attr_reader"><code>Module#attr_reader</code></a> and <a href="../Module.html#method-i-attr_writer"><code>Module#attr_writer</code></a> become public. [Feature #14132]</p>
</li><li>
<p><a href="../Module.html#method-i-define_method"><code>Module#define_method</code></a>, <a href="../Module.html#method-i-alias_method"><code>Module#alias_method</code></a>, <a href="../Module.html#method-i-undef_method"><code>Module#undef_method</code></a> and <a href="../Module.html#method-i-remove_method"><code>Module#remove_method</code></a> become public. [Feature #14133]</p>
</li></ul>
</li><li>
<p><a href="../Numeric.html"><code>Numeric</code></a></p>
<ul><li>
<p><a href="../Numeric.html#method-i-step"><code>Numeric#step</code></a> no longer hides errors from coerce method when given a step value which cannot be compared with #&gt; to 0. [Feature #7688]</p>
</li><li>
<p>Numerical comparison operators (&lt;,&lt;=,&gt;=,&gt;) no longer hide exceptions from coerce method internally. Return nil in coerce if the coercion is impossible.  [Feature #7688]</p>
</li></ul>
</li><li>
<p><a href="../Process.html"><code>Process</code></a></p>
<ul><li>
<p>Precision of <a href="../Process.html#method-c-times"><code>Process.times</code></a> is improved if getrusage(2) exists. [Feature #11952]</p>
</li><li>
<p>New method:</p>
<ul><li>
<p><a href="../Process.html#method-c-last_status"><code>Process.last_status</code></a> as an alias of $? [Feature #14043]</p>
</li></ul>
</li></ul>
</li><li>
<p><a href="../Range.html"><code>Range</code></a></p>
<ul><li>
<p>Range#initialize no longer hides exceptions when comparing begin and end with #&lt;=&gt; and raise a “bad value for range” <a href="../ArgumentError.html"><code>ArgumentError</code></a> but instead lets the exception from the #&lt;=&gt; call go through. [Feature #7688]</p>
</li></ul>
</li><li>
<p><a href="../Regexp.html"><code>Regexp</code></a></p>
<ul><li>
<p>Update to Onigmo 6.1.3-669ac9997619954c298da971fcfacccf36909d05.</p>
<ul><li>
<p>Support absence operator <a href="https://github.com/k-takata/Onigmo/issues/82">github.com/k-takata/Onigmo/issues/82</a></p>
</li></ul>
</li><li>
<p>Support new 5 emoji-related Unicode character properties</p>
</li></ul>
</li><li>
<p><a href="../RubyVM/InstructionSequence.html"><code>RubyVM::InstructionSequence</code></a></p>
<ul><li>
<p>New method:</p>
<ul><li>
<p><a href="../RubyVM/InstructionSequence.html#method-i-each_child"><code>RubyVM::InstructionSequence#each_child</code></a></p>
</li><li>
<p><a href="../RubyVM/InstructionSequence.html#method-i-trace_points"><code>RubyVM::InstructionSequence#trace_points</code></a></p>
</li></ul>
</li></ul>
</li><li>
<p><a href="../String.html"><code>String</code></a></p>
<ul><li>
<p><code>String#-@</code> deduplicates unfrozen strings.  Already-frozen strings remain unchanged for compatibility.  [Feature #13077]</p>
</li><li>
<p><code>-&quot;literal&quot;</code> (<code>String#-@</code>) optimized to return the same object (same as <code>&quot;literal&quot;.freeze</code> in Ruby 2.1+) [Feature #13295]</p>
</li><li>
<p><a href="../String.html#method-i-casecmp"><code>String#casecmp</code></a> and <a href="../String.html#method-i-casecmp-3F"><code>String#casecmp?</code></a> return nil for non-string arguments instead of raising a <a href="../TypeError.html"><code>TypeError</code></a>. [Bug #13312]</p>
</li><li>
<p><a href="../String.html#method-i-start_with-3F"><code>String#start_with?</code></a> accepts a regexp [Feature #13712]</p>
</li><li>
<p>New methods:</p>
<ul><li>
<p><a href="../String.html#method-i-delete_prefix"><code>String#delete_prefix</code></a>, <a href="../String.html#method-i-delete_prefix-21"><code>String#delete_prefix!</code></a> [Feature #12694]</p>
</li><li>
<p><a href="../String.html#method-i-delete_suffix"><code>String#delete_suffix</code></a>, <a href="../String.html#method-i-delete_suffix-21"><code>String#delete_suffix!</code></a> [Feature #13665]</p>
</li><li>
<p><a href="../String.html#method-i-each_grapheme_cluster"><code>String#each_grapheme_cluster</code></a> and <a href="../String.html#method-i-grapheme_clusters"><code>String#grapheme_clusters</code></a> to enumerate grapheme clusters [Feature #13780]</p>
</li><li>
<p><a href="../String.html#method-i-undump"><code>String#undump</code></a> to unescape <a href="../String.html#method-i-dump"><code>String#dump</code></a>‘ed string [Feature #12275]</p>
</li></ul>
</li></ul>
</li><li>
<p><a href="../Struct.html"><code>Struct</code></a></p>
<ul><li>
<p><a href="../Struct.html#method-c-new"><code>Struct.new</code></a> takes ‘keyword_init: true` option to initialize members with keyword arguments. [Feature #11925]</p>
</li></ul>
</li><li>
<p>Regexp/String: Update Unicode version from 9.0.0 to 10.0.0 [Feature #13685]</p>
</li><li>
<p><a href="../Thread.html"><code>Thread</code></a></p>
<ul><li>
<p>Description set by <a href="../Thread.html#method-i-name-3D"><code>Thread#name=</code></a> is now visible on Windows 10.</p>
</li><li>
<p>New method:</p>
<ul><li>
<p><a href="../Thread.html#method-i-fetch"><code>Thread#fetch</code></a>  [Feature #13009]</p>
</li></ul>
</li><li>
<p>The default of <a href="../Thread.html#method-c-report_on_exception"><code>Thread.report_on_exception</code></a> is now true, showing unhandled exceptions terminating threads on $stderr. [Feature #14143]</p>
</li></ul>
</li><li>
<p><a href="../Time.html"><code>Time</code></a></p>
<ul><li>
<p><a href="../Time.html#method-c-at"><code>Time.at</code></a> receives 3rd argument which specifies the unit of 2nd argument. [Feature #13919]</p>
</li></ul>
</li><li>
<p><a href="../KeyError.html"><code>KeyError</code></a></p>
<ul><li>
<p>New methods:</p>
<ul><li>
<p><a href="../KeyError.html#method-i-receiver"><code>KeyError#receiver</code></a> [Feature #12063]</p>
</li><li>
<p><a href="../KeyError.html#method-i-key"><code>KeyError#key</code></a>      [Feature #12063]</p>
</li></ul>
</li></ul>
</li><li>
<p><a href="../FrozenError.html"><code>FrozenError</code></a></p>
<ul><li>
<p>New exception class. [Feature #13224]</p>
</li></ul>
</li></ul>

<h3 id="label-Stdlib+updates+-28outstanding+ones+only-29">Stdlib updates (outstanding ones only)<span><a href="#label-Stdlib+updates+-28outstanding+ones+only-29">&para;</a> <a href="#top">&uarr;</a></span></h3>
<ul><li>
<p>BigDecimal</p>
<ul><li>
<p>Update to BigDecimal 1.3.4</p>
</li><li>
<p>The following features are added:</p>
<ul><li>
<p>BigDecimal::VERSION</p>
</li></ul>
</li><li>
<p>The following features have been deprecated, and are planned to be removed in the version 1.4.0:</p>
<ul><li>
<p>BigDecimal.new</p>
</li><li>
<p>BigDecimal.ver</p>
</li></ul>
</li><li>
<p>BigDecimal#clone and dup now do not make a new instance, but returns the receiver itself.</p>
</li></ul>
</li><li>
<p>Coverage</p>
<ul><li>
<p>Support branch coverage and method coverage measurement. [Feature #13901] Branch coverage tells you which branches are executed, and which not. <a href="../Method.html"><code>Method</code></a> coverage tells you which methods are invoked, and which not. By running a test suite with this new feature, you can know which branches and methods are executed by a test, and evaluate total coverage of a test suite more strictly.</p>

<p>You can specify the measuring target by an option to ‘Coverage.start`:</p>

<pre class="ruby"><span class="ruby-constant">Coverage</span>.<span class="ruby-identifier">start</span>(<span class="ruby-value">lines:</span> <span class="ruby-keyword">true</span>, <span class="ruby-value">branches:</span> <span class="ruby-keyword">true</span>, <span class="ruby-value">methods:</span> <span class="ruby-keyword">true</span>)
</pre>

<p>After some Ruby files are loaded, you can use ‘Coverage.result` to get the coverage result:</p>

<pre class="ruby"><span class="ruby-constant">Coverage</span>.<span class="ruby-identifier">result</span>
<span class="ruby-comment">#=&gt; { &quot;/path/to/file.rb&quot;=&gt;</span>
<span class="ruby-comment">#     { :lines =&gt; [1, 2, 0, nil, ...],</span>
<span class="ruby-comment">#       :branches =&gt;</span>
<span class="ruby-comment">#         { [:if, 0, 2, 1, 6, 4] =&gt;</span>
<span class="ruby-comment">#             { [:then, 1, 3, 2, 3, 8] =&gt; 0,</span>
<span class="ruby-comment">#               [:else, 2, 5, 2, 5, 8] =&gt; 2</span>
<span class="ruby-comment">#             }</span>
<span class="ruby-comment">#         },</span>
<span class="ruby-comment">#       :methods =&gt; {</span>
<span class="ruby-comment">#          [Object, :foo, 1, 0, 7, 3] =&gt; 2</span>
<span class="ruby-comment">#       }</span>
<span class="ruby-comment">#     }</span>
<span class="ruby-comment">#   }</span>
</pre>

<p>The result type of line coverage is not changed; it is just an array that contains numbers, which means the count that each line was executed, or ‘nil`s, which means that the line is not relevant.</p>

<p>The result type of branch coverage is:</p>

<pre class="ruby">{ (<span class="ruby-identifier">jump</span> <span class="ruby-identifier">base</span>) <span class="ruby-operator">=&gt;</span> { (<span class="ruby-identifier">jump</span> <span class="ruby-identifier">target</span>) <span class="ruby-operator">=&gt;</span> (<span class="ruby-identifier">counter</span>) } }
</pre>

<p>where jump base and targets have the format</p>

<pre>[type, unique-id, start lineno, start column, end lineno, end column]</pre>

<p>For example, ‘[:if, 0, 2, 1, 6, 4]` reads an `if` statement that ranges from line 2 and column 1, to line 6 and column 4.  `[:then, 1, 3, 2, 3, 8]` reads a `then` clause that ranges from line 3 and column 2, to line 3 and column 8. Note that lineno starts from 1, and that columnno starts from 0.  So, the above example shows a branch from the `if` to the `then` was never executed, and a branch from the `if` to the `else` was executed twice.</p>

<p>The result type of method coverage is:</p>

<pre class="ruby">{ (<span class="ruby-identifier">method</span> <span class="ruby-identifier">key</span>) <span class="ruby-operator">=&gt;</span> (<span class="ruby-identifier">counter</span>) }
</pre>

<p>where method key has the format</p>

<pre>[class, method-name, start lineno, start column, end lineno, end column]</pre>

<p>For example, ‘[Object, :foo, 1, 0, 7, 3]` reads `Object#foo` that ranges from line 1 and column 0, to line 7 and column 3.  The above example shows this `Object#foo` was invoked twice.</p>

<p>Note: To keep compatibility, passing no option to ‘Coverage.start` will measure only line coverage, and `Coverage.result` will return the old format:</p>

<pre class="ruby"><span class="ruby-constant">Coverage</span>.<span class="ruby-identifier">result</span>
<span class="ruby-comment">#=&gt; { &quot;/path/to/file.rb&quot;=&gt; [1, 2, 0, nil, ...] }</span>
</pre>
</li></ul>
</li><li>
<p>DRb</p>
<ul><li>
<p>ACL::ACLEntry.new no longer suppresses IPAddr::InvalidPrefixError.</p>
</li></ul>
</li><li>
<p>ERB</p>
<ul><li>
<p>Add ERB#result_with_hash to render a template with local variables passed with a <a href="../Hash.html"><code>Hash</code></a> object. [Feature #8631]</p>
</li><li>
<p>Default template file encoding is changed from ASCII-8BIT to UTF-8 in erb command. [Bug #14095]</p>
</li><li>
<p>Carriage returns are changed to be trimmed properly if trim_mode is specified and used. Duplicated newlines will be removed on Windows. [Bug #5339] [Bug #11464]</p>
</li></ul>
</li><li>
<p>IPAddr</p>
<ul><li>
<p>IPAddr no longer accepts invalid address mask. [Bug #13399]</p>
</li><li>
<p>IPAddr#ipv4_compat and IPAddr#ipv4_compat? are marked for deprecation. [Bug #13769]</p>
</li><li>
<p>New methods:</p>
<ul><li>
<p>IPAddr#prefix</p>
</li><li>
<p>IPAddr#loopback?</p>
</li><li>
<p>IPAddr#private? [Feature #11666]</p>
</li><li>
<p>IPAddr#link_local? [Feature #10912]</p>
</li></ul>
</li></ul>
</li><li>
<p>IRB</p>
<ul><li>
<p>Print backtrace and error message in reverse order [Feature #8661] [experimental]</p>
</li><li>
<p>‘binding.irb` automatically requires irb and runs [Bug #13099] [experimental]</p>
</li><li>
<p>‘binding.irb` on its start shows source around the line where it was called [Feature #14124]</p>
</li></ul>
</li><li>
<p>Matrix</p>
<ul><li>
<p>New methods:</p>
<ul><li>
<p>Matrix.combine and Matrix#combine [Feature #10903]</p>
</li><li>
<p>Matrix#hadamard_product and Matrix#entrywise_product</p>
</li></ul>
</li></ul>
</li><li>
<p>Net::HTTP</p>
<ul><li>
<p>Net::HTTP.new supports no_proxy parameter [Feature #11195]</p>
</li><li>
<p>Net::HTTP#min_version and Net::HTTP#max_version [Feature #9450]</p>
</li><li>
<p>Add more HTTP status classes</p>
</li><li>
<p>Net::HTTP::STATUS_CODES is added as HTTP Status Code Repository [Misc #12935]</p>
</li><li>
<p>Net::HTTP#proxy_user and Net::HTTP#proxy_pass reflect http_proxy environment variable if the system’s environment variable is multiuser safe. [Bug #12921]</p>
</li></ul>
</li><li>
<p>open-uri</p>
<ul><li>
<p>URI.open method defined as an alias to open-uri’s <a href="../Kernel.html#method-i-open"><code>Kernel.open</code></a>. open-uri’s <a href="../Kernel.html#method-i-open"><code>Kernel.open</code></a> will be deprecated in future.</p>
</li></ul>
</li><li>
<p>OpenSSL</p>
<ul><li>
<p>Updated Ruby/OpenSSL from version 2.0 to 2.1. Changes are noted in “Version 2.1.0” section in ext/openssl/History.md.</p>
</li></ul>
</li><li>
<p>Pathname</p>
<ul><li>
<p>New method:</p>
<ul><li>
<p>Pathname#glob [Feature #7360]</p>
</li></ul>
</li></ul>
</li><li>
<p>Psych</p>
<ul><li>
<p>Update to Psych 3.0.2.</p>
<ul><li>
<p>Convert fallback option to a keyword argument <a href="https://github.com/ruby/psych/pull/342">github.com/ruby/psych/pull/342</a></p>
</li><li>
<p>Add :symbolize_names option to Psych.load, Psych.safe_load like JSON.parse <a href="https://github.com/ruby/psych/pull/333">github.com/ruby/psych/pull/333</a>, <a href="https://github.com/ruby/psych/pull/337">github.com/ruby/psych/pull/337</a></p>
</li><li>
<p>Add Psych::Handler#event_location <a href="https://github.com/ruby/psych/pull/326">github.com/ruby/psych/pull/326</a></p>
</li><li>
<p>Make frozen string literal = true <a href="https://github.com/ruby/psych/pull/320">github.com/ruby/psych/pull/320</a></p>
</li><li>
<p>Preserve time zone offset when deserializing times <a href="https://github.com/ruby/psych/pull/316">github.com/ruby/psych/pull/316</a></p>
</li><li>
<p>Remove deprecated method aliases for syck gem <a href="https://github.com/ruby/psych/pull/312">github.com/ruby/psych/pull/312</a></p>
</li></ul>
</li></ul>
</li><li>
<p>RbConfig</p>
<ul><li>
<p>RbConfig::LIMITS is added to provide the limits of C types. This is available when rbconfig/sizeof is loaded.</p>
</li></ul>
</li><li>
<p>Ripper</p>
<ul><li>
<p>Ripper::EXPR_BEG and so on for Ripper#state.</p>
</li><li>
<p>New method:</p>
<ul><li>
<p>Ripper#state to tell the state of scanner. [Feature #13686]</p>
</li></ul>
</li></ul>
</li><li>
<p><a href="../RDoc.html"><code>RDoc</code></a></p>
<ul><li>
<p>Update to <a href="../RDoc.html"><code>RDoc</code></a> 6.0.1.</p>
<ul><li>
<p>Replace IRB based lexer with Ripper.</p>
<ul><li>
<p><a href="https://github.com/ruby/rdoc/pull/512">github.com/ruby/rdoc/pull/512</a></p>
</li><li>
<p>This much improves the speed of generating documents.</p>
</li><li>
<p>It also facilitates supporting new syntax in the future.</p>
</li></ul>
</li><li>
<p>Support many new syntaxes of Ruby from the past few years.</p>
</li><li>
<p>Use “frozen_string_literal: true”. Performance survey: <a href="https://gist.github.com/aycabta/abdfaa75ea8a6877eeb734e942e73800">gist.github.com/aycabta/abdfaa75ea8a6877eeb734e942e73800</a></p>
</li><li>
<p>Support did_you_mean.</p>
</li></ul>
</li></ul>
</li><li>
<p>Rubygems</p>
<ul><li>
<p>Update to Rubygems 2.7.3.</p>
<ul><li>
<p><a href="http://blog.rubygems.org/2017/11/28/2.7.3-released.html">blog.rubygems.org/2017/11/28/2.7.3-released.html</a></p>
</li><li>
<p><a href="http://blog.rubygems.org/2017/11/08/2.7.2-released.html">blog.rubygems.org/2017/11/08/2.7.2-released.html</a></p>
</li><li>
<p><a href="http://blog.rubygems.org/2017/11/03/2.7.1-released.html">blog.rubygems.org/2017/11/03/2.7.1-released.html</a></p>
</li><li>
<p><a href="http://blog.rubygems.org/2017/11/01/2.7.0-released.html">blog.rubygems.org/2017/11/01/2.7.0-released.html</a></p>
</li><li>
<p><a href="http://blog.rubygems.org/2017/10/09/2.6.14-released.html">blog.rubygems.org/2017/10/09/2.6.14-released.html</a></p>
</li><li>
<p><a href="http://blog.rubygems.org/2017/08/27/2.6.13-released.html">blog.rubygems.org/2017/08/27/2.6.13-released.html</a></p>
</li></ul>
</li></ul>
</li><li>
<p>SecureRandom</p>
<ul><li>
<p>New method:</p>
<ul><li>
<p>SecureRandom.alphanumeric</p>
</li></ul>
</li></ul>
</li><li>
<p>Set</p>
<ul><li>
<p>New methods:</p>
<ul><li>
<p>Set#to_s as alias to inspect [Feature #13676]</p>
</li><li>
<p>Set#=== as alias to include? [Feature #13801]</p>
</li><li>
<p>Set#reset [Feature #6589]</p>
</li></ul>
</li></ul>
</li><li>
<p>StringIO</p>
<ul><li>
<p>StringIO#write accepts multiple arguments</p>
</li></ul>
</li><li>
<p>StringScanner</p>
<ul><li>
<p>New methods:</p>
<ul><li>
<p>StringScanner#size, StringScanner#captures, StringScanner#values_at  [Feature #836]</p>
</li></ul>
</li></ul>
</li><li>
<p>URI</p>
<ul><li>
<p>Relative path operations no longer collapse consecutive slashes to a single slash. [Bug #8352]</p>
</li></ul>
</li><li>
<p>WEBrick</p>
<ul><li>
<p>Add Server Name Indication (SNI) support [Feature #13729]</p>
</li><li>
<p>support <a href="../Proc.html"><code>Proc</code></a> objects as body responses [Feature #855]</p>
</li><li>
<p>released as a RubyGem [Feature #13173]</p>
</li><li>
<p>avoid unintended behavior from <a href="../Kernel.html#method-i-open"><code>Kernel#open</code></a> [Misc #14216]</p>
</li></ul>
</li><li>
<p>Zlib</p>
<ul><li>
<p>Zlib::GzipWriter#write accepts multiple arguments</p>
</li></ul>
</li></ul>

<h3 id="label-Compatibility+issues+-28excluding+feature+bug+fixes-29">Compatibility issues (excluding feature bug fixes)<span><a href="#label-Compatibility+issues+-28excluding+feature+bug+fixes-29">&para;</a> <a href="#top">&uarr;</a></span></h3>
<ul><li>
<p>BasicSocket</p>
<ul><li>
<p>BasicSocket#read_nonblock and BasicSocket#write_nonblock no longer set the O_NONBLOCK file description flag as side effect (on Linux only) [Feature #13362]</p>
</li></ul>
</li><li>
<p><a href="../Random.html"><code>Random</code></a></p>
<ul><li>
<p>Random.raw_seed renamed to become <a href="../Random.html#method-c-urandom"><code>Random.urandom</code></a>.  It is now applicable to non-seeding purposes due to [Bug #9569].</p>
</li></ul>
</li><li>
<p>Socket</p>
<ul><li>
<p>Socket::Ifaddr#vhid is added [Feature #13803]</p>
</li></ul>
</li><li>
<p>ConditionVariable, Queue and SizedQueue reimplemented for speed. They no longer subclass <a href="../Struct.html"><code>Struct</code></a>. [Feature #13552]</p>
</li></ul>

<h3 id="label-Stdlib+compatibility+issues+-28excluding+feature+bug+fixes-29">Stdlib compatibility issues (excluding feature bug fixes)<span><a href="#label-Stdlib+compatibility+issues+-28excluding+feature+bug+fixes-29">&para;</a> <a href="#top">&uarr;</a></span></h3>
<ul><li>
<p>Gemification</p>
<ul><li>
<p>Promote following standard libraries to default gems.</p>
<ul><li>
<p>cmath</p>
</li><li>
<p>csv</p>
</li><li>
<p>date</p>
</li><li>
<p>dbm</p>
</li><li>
<p>etc</p>
</li><li>
<p>fcntl</p>
</li><li>
<p>fiddle</p>
</li><li>
<p>fileutils</p>
</li><li>
<p>gdbm</p>
</li><li>
<p>ipaddr</p>
</li><li>
<p>scanf</p>
</li><li>
<p>sdbm</p>
</li><li>
<p>stringio</p>
</li><li>
<p>strscan</p>
</li><li>
<p>webrick</p>
</li><li>
<p>zlib</p>
</li></ul>
</li></ul>
</li><li>
<p>Logger</p>
<ul><li>
<p>Logger.new(“| command”) had been working to open a command unintentionally. It was prohibited, and now Logger#initialize treats a <a href="../String.html"><code>String</code></a> argument only as a filename, as its specification. [Bug #14212]</p>
</li></ul>
</li><li>
<p>Net::HTTP</p>
<ul><li>
<p>Net::HTTP#start now passes :ENV to p_addr by default. [Bug #13351] To avoid this, pass nil explicitly.</p>
</li></ul>
</li><li>
<p>mathn.rb</p>
<ul><li>
<p>Removed from stdlib. [Feature #10169]</p>
</li></ul>
</li><li>
<p>Rubygems</p>
<ul><li>
<p>Removed “ubygems.rb” file from stdlib. It’s needless since Ruby 1.9.</p>
</li></ul>
</li></ul>

<h3 id="label-Supported+platform+changes">Supported platform changes<span><a href="#label-Supported+platform+changes">&para;</a> <a href="#top">&uarr;</a></span></h3>
<ul><li>
<p>Drop support of NaCl platform</p>
<ul><li>
<p><a href="https://bugs.chromium.org/p/chromium/issues/detail?id=239656#c160">bugs.chromium.org/p/chromium/issues/detail?id=239656#c160</a></p>
</li></ul>
</li></ul>

<h3 id="label-Implementation+improvements">Implementation improvements<span><a href="#label-Implementation+improvements">&para;</a> <a href="#top">&uarr;</a></span></h3>
<ul><li>
<p>(This might not be a “user visible feature change” but) <a href="../Hash.html"><code>Hash</code></a> class’s hash function is now SipHash13. [Feature #13017]</p>
</li><li>
<p>SecureRandom now prefers OS-provided sources than OpenSSL. [Bug #9569]</p>
</li><li>
<p>Mutex rewritten to be smaller and faster [Feature #13517]</p>
</li><li>
<p>Performance of block passing using block parameters is improved by lazy <a href="../Proc.html"><code>Proc</code></a> allocation [Feature #14045]</p>
</li><li>
<p>Dynamic instrumentation for <a href="../TracePoint.html"><code>TracePoint</code></a> hooks instead of using “trace” instruction to avoid overhead [Feature #14104]</p>
</li><li>
<p>ERB now generates code from a template twice as fast as Ruby 2.4</p>
</li></ul>

<h3 id="label-Miscellaneous+changes">Miscellaneous changes<span><a href="#label-Miscellaneous+changes">&para;</a> <a href="#top">&uarr;</a></span></h3>
<ul><li>
<p>Print backtrace and error message in reverse order if $stderr is unchanged and a tty. [Feature #8661] [experimental]</p>
</li><li>
<p>Print error message in bold/underlined text if $stderr is unchanged and a tty. [Feature #14140] [experimental]</p>
</li><li>
<p>configure option –with-ext now mandates its arguments.  So for instance if you run ./configure –with-ext=openssl,+ then the openssl library is guaranteed compiled, otherwise the build fails abnormally.</p>

<p>Note however to always add the “,+” at the end of the argument. Otherwise nothing but openssl are built.  [Feature #13302]</p>
</li></ul>

</main>

</div>  <!--  class='wrapper hdiv' -->


<footer id="validator-badges" role="contentinfo">
<p><a href="https://validator.w3.org/check/referer">Validate</a></p>
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.4.0.</p>
<p>Based on <a href="https://github.com/ged/darkfish/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.</p>

  
    <p><p><a href="https://ruby-doc.org">Ruby-doc.org</a> is provided by <a href="https://jamesbritt.com">James Britt</a> and <a href="https://neurogami.com">Neurogami</a>. </p><p><a href="https://jamesbritt.bandcamp.com/">Hack your world.  Feed your head.  Live curious</a>.</p>
</p>
  
  </footer>

<script type="text/javascript">


  let ads  = $("#carbonads-container").children().detach();


  function swapMode() {
    var cookieName = 'darkmode';
    var cssDarkmode = Cookies.get(cookieName);
    console.log("***** swapMode! " + cssDarkmode + " *****");


    if (cssDarkmode == "true") {
      console.log("We have dark mode, set the css to light ...");
      $('#rdoccss').attr("href", defaultModeCssHref);
      $('#cssSelect').text("Dark mode");
      cssDarkmode = "false";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    } else {
      console.log("We not have dark mode, set the css to dark ...");
      $('#rdoccss').attr("href", darkModeCsseHref);
      $('#cssSelect').text("Light mode");
      cssDarkmode = "true";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    }

    console.log("  --------------- ");
  }


const vueCssApp = new Vue({
el: '#menubar',
data: {
isDark: false
},
methods: {
toggleClass: function(event){
this.isDark = !this.isDark;
}
}
})

const vueApp = new Vue({
el: '#vapp',
data: { 
isOpen: true
},

mounted() {
this.handleResize();
this.manage_mob_classes();
window.addEventListener('resize', this.handleResize)
//this.isOpen !=  (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},
destroyed() {
window.removeEventListener('resize', this.handleResize)
},
created() {
//manage_mob_classes();
},

methods : {
isMobile() {
  return (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},

  handleResize() {
    if (!this.isMobile()) {
      this.isOpen = window.innerWidth > 800;
    }
  },

  manage_mob_classes() {
    if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
      $("nav").addClass("mob_nav");
      $("main").addClass("mob_main");
      $("#extraz").addClass("mob_extraz");
      $("#carbonads-container").addClass("mob_carbonads-container");
      this.isOpen  = false;
    } else {
      $("nav").removeClass("mob_nav") 
        $("main").removeClass("mob_main");
      $("#extraz").removeClass("mob_extraz");
      $("#carbonads-container").removeClass("mob_carbonads-container");
      this.isOpen  = true;
    }
  },

  toggleNav() {
    this.isOpen =! this.isOpen ;
    // alert("Toggle nav!");
    console.log("toggleNav() click: " + this.isOpen );
  }
}
})

$("#carbonads-container").append(ads);


$(function() {

    var darkmode = Cookies.get("darkmode");
    console.log("Document ready: " + darkmode);

    if ( darkmode  == "true" ) {
      $('#cssSelect').text("Light mode");
    } else {
      $('#cssSelect').text("Dark mode");
     }

    $('body').css('display','block');
    });

</script>

    
  </body> 
</html>

